package util

import "time"

func Retry(function func() bool, dy int) bool {
	for {
		if function() {
			return true
		}
		time.Sleep(time.Duration(dy) * time.Second)
	}
}
